﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RoadTeam.Model;
using RoadTeam.Enums;
using System.Data;
public partial class 对接测试页面_添加数据_InsertSysUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        RoadTeam.Model.SysUser user = new SysUser();
        user.UserIdentifier = Guid.NewGuid().ToString("N");
        user.UserName = "Shark";
        user.UserPwd = "111111";
       // user.UserState = true;
        user.UserLoginID = "Shark";
        user.UserTypeName = "系统管理员";
        Response.Write (SysUser.InserObjedct(user, GlobalConfig.ConnectionString).ToString());
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn("UserIdentifier", typeof(string)));
        dt.Columns.Add(new DataColumn("UserName", typeof(string)));
        dt.Columns.Add(new DataColumn("UserPwd", typeof(string)));
        dt.Columns.Add(new DataColumn("UserState", typeof(string)));
        dt.Columns.Add(new DataColumn("UserLoginID", typeof(string)));
        dt.Columns.Add(new DataColumn("UserTypeName", typeof(string)));

        DataRow dr = dt.NewRow();
        dr["UserIdentifier"] = Guid.NewGuid().ToString("N");
        dr["UserName"] = "小明";
        dr["UserPwd"] = "111111";
        dr["UserState"] = true;
        dr["UserLoginID"] = "小明";
        dr["UserTypeName"] = "系统管理员";
        dt.Rows.Add(dr);
         dr = dt.NewRow();
        dr["UserIdentifier"] = Guid.NewGuid().ToString("N");
        dr["UserName"] = "小白";
        dr["UserPwd"] = "111111";
        dr["UserState"] = true;
        dr["UserLoginID"] = "小白";
        dr["UserTypeName"] = "系统管理员";
        dt.Rows.Add(dr);
        dr = dt.NewRow();
        dr["UserIdentifier"] = Guid.NewGuid().ToString("N");
        dr["UserName"] = "小黑";
        dr["UserPwd"] = "111111";
        dr["UserState"] = true;
        dr["UserLoginID"] = "小黑";
        dr["UserTypeName"] = "系统管理员";
        dt.Rows.Add(dr);

        Response.Write(SysUser.InsertDatatable(dt, GlobalConfig.ConnectionString).ToString());

    }
}